package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysServiceWorkOrderBiMapper;
import com.ruoyi.system.domain.SysServiceWorkOrderBi;
import com.ruoyi.system.service.ISysServiceWorkOrderBiService;

/**
 * SysServiceWorkOrderBiService业务层处理
 * 
 * @author SYF
 * @date 2025-06-04
 */
@Service
public class SysServiceWorkOrderBiServiceImpl implements ISysServiceWorkOrderBiService 
{
    @Autowired
    private SysServiceWorkOrderBiMapper sysServiceWorkOrderBiMapper;

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public SysServiceWorkOrderBi selectSysServiceWorkOrderBiByYear(String id)
    {
        return sysServiceWorkOrderBiMapper.selectSysServiceWorkOrderBiByYear(id);
    }

    /**
     * 查询SysServiceWorkOrderBi列表
     * 
     * @param sysServiceWorkOrderBi SysServiceWorkOrderBi
     * @return SysServiceWorkOrderBi
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysServiceWorkOrderBi> selectSysServiceWorkOrderBiList(SysServiceWorkOrderBi sysServiceWorkOrderBi)
    {
        return sysServiceWorkOrderBiMapper.selectSysServiceWorkOrderBiList(sysServiceWorkOrderBi);
    }

    /**
     * 新增SysServiceWorkOrderBi
     * 
     * @param sysServiceWorkOrderBi SysServiceWorkOrderBi
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int insertSysServiceWorkOrderBi(SysServiceWorkOrderBi sysServiceWorkOrderBi)
    {
        return sysServiceWorkOrderBiMapper.insertSysServiceWorkOrderBi(sysServiceWorkOrderBi);
    }

    /**
     * 修改SysServiceWorkOrderBi
     * 
     * @param sysServiceWorkOrderBi SysServiceWorkOrderBi
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int updateSysServiceWorkOrderBi(SysServiceWorkOrderBi sysServiceWorkOrderBi)
    {
        return sysServiceWorkOrderBiMapper.updateSysServiceWorkOrderBi(sysServiceWorkOrderBi);
    }

    /**
     * 批量删除SysServiceWorkOrderBi
     * 
     * @param years 需要删除的SysServiceWorkOrderBi主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteSysServiceWorkOrderBiByYears(String[] years)
    {
        return sysServiceWorkOrderBiMapper.deleteSysServiceWorkOrderBiByYears(years);
    }

    /**
     * 删除SysServiceWorkOrderBi信息
     * 
     * @param year SysServiceWorkOrderBi主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public int deleteSysServiceWorkOrderBiByYear(String year)
    {
        return sysServiceWorkOrderBiMapper.deleteSysServiceWorkOrderBiByYear(year);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectKfhfOrders(){
        return sysServiceWorkOrderBiMapper.selectKfhfOrders();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectKfhfOrdersInfo(SysServiceWorkOrderBi sysServiceWorkOrderBi){
        return sysServiceWorkOrderBiMapper.selectKfhfOrdersInfo(sysServiceWorkOrderBi);
    }
}
